//
//  ZXYXYAxisView.h
//  Targeting
//
//  Created by zhouxiaoyu on 14-6-24.
//  Copyright (c) 2014年 duostec. All rights reserved.
//

#import <UIKit/UIKit.h>
@class ZXYXYAxisView;
@protocol ZXYAxisDatasource <NSObject>
@required
/**
 * @return返回一个view 放到指定的位置上
 *
 */
- (UIView *)axisView:(ZXYXYAxisView *)axisView viewAtData:(NSInteger)indexData;

/**
 * @return所有数据的数目
 *
 *
 */
- (NSInteger)axisViewNumberOfDataNum:(ZXYXYAxisView *)axisView;
//必须实现一个
@optional
/**
 * @return(key:x-->number,y-->number)
 * x 表示横轴
 * y 表示纵轴
 */
- (NSDictionary *)axisView:(ZXYXYAxisView *)axisView dataForAxisAtIndex:(NSInteger)indexData;

/**
 * @return(key:x-->string,y-->number)
 * x 表示横轴
 * y 表示纵轴
 */

- (NSDictionary *)axisView:(ZXYXYAxisView *)axisView dataForAxisAtIndexXString:(NSInteger)indexData;

/**
 * @return(key:x-->number,y-->string)
 * x 表示横轴
 * y 表示纵轴
 */
- (NSDictionary *)axisView:(ZXYXYAxisView *)axisView dataForAxisAtIndexYString:(NSInteger)indexData;

/**
 * @return(key:x-->string,y-->string)
 * x 表示横轴
 * y 表示纵轴
 */
- (NSDictionary *)axisView:(ZXYXYAxisView *)axisView dataForAxisAtIndexXYString:(NSInteger)indexData;
@end

@protocol ZXYAxisDelegate <NSObject>
- (void)axisView:(ZXYXYAxisView *)axisView didSelectAtIndex:(NSInteger)indexData;
@end
@interface ZXYXYAxisView : UIView
@property (nonatomic,strong)IBOutlet id<ZXYAxisDatasource>dataSource;
@property (nonatomic,strong)IBOutlet id<ZXYAxisDelegate>delegate;
- (void)reloadAxisData;

@end
